import router from './router'
import Vue from 'vue'

router.beforeEach((to, from, next) => {
  // 设置页面标题
  document.title = to.meta.title
  next()
  // 登录token拦截
  /*if(localStorage.getItem('token')) {
    if(to.path == '/login') {
      next('/')
    }else {
      next()
    }
  }else {
    if(to.path != '/login') {
      next('/login')
    }else {
      next()
    }
  }*/
})
